﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TLD_Vision.OCR
{
    public class OCRResult : IComparable<OCRResult>
    {
        private String _fontname;
        private String _glyph;
        private double _matching;

        public String FontName
        {
            get { return _fontname; }
        }

        public String Glyph
        {
            get
            {
                return _glyph;
            }
        }

        public double MatchingPixels 
        { 
            get { return _matching; } 
        }

        public OCRResult(String fontname, String glyph, double matching)
        {
            _fontname = fontname;
            _glyph = glyph;
            _matching = matching;          
        }

        public int CompareTo(OCRResult other)
        {
            if (other._matching == _matching) {
                return 0;
            } else if (other._matching < _matching) {
                return -1;
            } else {
                return 1;
            }
        }
    }
}
